﻿using System;
using System.Windows.Forms;

namespace KWBridge
{
    public partial class KJParasUserControl : UserControl
    {
        public KJParasUserControl( )
        {
            InitializeComponent( );
        }

        private void cbbKJType_SelectedIndexChanged( object sender , EventArgs e )
        {
            switch ( cbbKJType.Text )
            {
                case "KJ66N":
                case "KJ70N":
                case "KJ75N":
                case "KJ76N":
                case "KJ86N":
                case "KJ90N":
                case "KJ95N":
                case "KJ92N":
                case "KJ126N":
                case "KJ103N":
                    tbDevFile.Text = "dev.txt";
                    tbRtData.Text = "rtdata.txt";
                    break;

                case "KJ4N":
                case "KJXY":
                    tbDevFile.Text = "InOutDefine";
                    tbRtData.Text = "实时数据;开关量";
                    break;

                case "KJ80N":
                case "KJ2000F":
                    tbDevFile.Text = "initdata.txt";
                    tbRtData.Text = "realdata.txt";
                    break;
            }

            if ( cbbKJType.Text.Trim( ) == "" )
            {
                tbDevFile.Text = string.Empty;
                tbRtData.Text = string.Empty;
            }
        }
    }
}